package cjj.test;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static org.bouncycastle.asn1.x500.style.RFC4519Style.st;

@SpringBootApplication
@RestController
public class ConfigClientApplication {

	public static void main(String[] args) {
		SpringApplication.run(ConfigClientApplication.class, args);
	}

	@Value("${foo}")
	String foo;
	@Value("${democonfigclient.message}")
	String message;


	@RequestMapping(value = "/hi")
	public String hi(){
		return foo;
	}

	@RequestMapping(value = "/message")
	public String message(){
		return message;
	}



    @Value("${hystrix.command.default.execution.timeout.enabled}")
	String hystrix;
	@RequestMapping(value = "/hystrix")
	public String hystrix(){
		return hystrix;
	}
//	@Value("${spring.rabbitmq.host}")
//	String host;
//
//	@Value("${spring.rabbitmq.port}")
//	int port;
//
//
//	@RequestMapping(value = "/host")
//	public String host(){
//		return host+":"+port;
//		//return host;
//	}

}
